<?php

header('Content-type: application/json');
$dow = $viewModel->get("dow")->params;

if (empty($dow)) {
    $dow = array();
} else {
    $dow = json_decode($dow)->DayOfWeek;
}
echo $a = json_encode($dow);

?>